# -----------------------------------------------
# Author: yuz
# Copyright: 湖南零檬信息技术有限公司
# Email: wagyu2016@163.com
# Phone&Wechat: 18173179913
# Site: http://www.lemonban.com
# Forum: http://testingpai.com
# -----------------------------------------------

import base64

# 加密, 编码规则
plain = "2".encode()
miwen = base64.b64encode(plain)   # 编码 、 加密
print(miwen.decode())

# 解密
result = base64.b64decode(miwen)
print(result)